package com.handyshop.mall.dubbo.order.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.handyshop.mall.dubbo.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

@ApiModel(value = "订单明细表")
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "nrs_order_item")
public class OrderItem extends BaseEntity {
    /**
     * 订单ID
     */
    @TableField(value = "order_id")
    @ApiModelProperty(value = "订单ID")
    private Long orderId;

    /**
     * 类目id
     */
    @TableField(value = "category_id")
    @ApiModelProperty(value = "类目id")
    private Long categoryId;

    /**
     * 商品ID
     */
    @TableField(value = "goods_id")
    @ApiModelProperty(value = "商品ID")
    private Long goodsId;

    /**
     * 货品ID
     */
    @TableField(value = "product_id")
    @ApiModelProperty(value = "货品ID")
    private Long productId;

    /**
     * 货品数量
     */
    @TableField(value = "product_num")
    @ApiModelProperty(value = "货品数量")
    private Integer productNum;

    /**
     * 发货数量
     */
    @TableField(value = "send_num")
    @ApiModelProperty(value = "发货数量")
    private Double sendNum;

    /**
     * 商家id
     */
    @TableField(value = "merchant_id")
    @ApiModelProperty(value = "商家id")
    private Long merchantId;

    /**
     * 条码
     */
    @TableField(value = "barcode")
    @ApiModelProperty(value = "条码")
    private String barcode;

    /**
     * 商品名称
     */
    @TableField(value = "`name`")
    @ApiModelProperty(value = "商品名称")
    private String name;

    /**
     * 商品规格描述
     */
    @TableField(value = "spec_info")
    @ApiModelProperty(value = "商品规格描述")
    private String specInfo;

    /**
     * 图片ID
     */
    @TableField(value = "image_id")
    @ApiModelProperty(value = "图片ID")
    private Long imageId;

    /**
     * 成本单价
     */
    @TableField(value = "cost_price")
    @ApiModelProperty(value = "成本单价")
    private BigDecimal costPrice;

    /**
     * 销售单价
     */
    @TableField(value = "sell_price")
    @ApiModelProperty(value = "销售单价")
    private BigDecimal sellPrice;

    /**
     * 会员单价
     */
    @TableField(value = "vip_price")
    @ApiModelProperty(value = "会员单价")
    private BigDecimal vipPrice;

    /**
     * 成交单价
     */
    @TableField(value = "buy_price")
    @ApiModelProperty(value = "成交单价")
    private BigDecimal buyPrice;

    /**
     * 明细商品类型
     */
    @TableField(value = "item_type")
    @ApiModelProperty(value = "明细商品类型")
    private Object itemType;

    /**
     * 商品总金额
     */
    @TableField(value = "goods_price")
    @ApiModelProperty(value = "商品总金额")
    private BigDecimal goodsPrice;

    /**
     * 运费总金额
     */
    @TableField(value = "freight")
    @ApiModelProperty(value = "运费总金额")
    private BigDecimal freight;

    /**
     * 优惠总金额
     */
    @TableField(value = "discounts")
    @ApiModelProperty(value = "优惠总金额")
    private BigDecimal discounts;

    /**
     * 应付总金额
     */
    @TableField(value = "total_price")
    @ApiModelProperty(value = "应付总金额")
    private BigDecimal totalPrice;

    /**
     * 实付总金额
     */
    @TableField(value = "payment")
    @ApiModelProperty(value = "实付总金额")
    private BigDecimal payment;

    /**
     * 会员身份优惠金额
     */
    @TableField(value = "vip_discount")
    @ApiModelProperty(value = "会员身份优惠金额")
    private BigDecimal vipDiscount;

    /**
     * 订单促销优惠金额
     */
    @TableField(value = "order_discount")
    @ApiModelProperty(value = "订单促销优惠金额")
    private BigDecimal orderDiscount;

    /**
     * 商品促销优惠金额
     */
    @TableField(value = "goods_discount")
    @ApiModelProperty(value = "商品促销优惠金额")
    private BigDecimal goodsDiscount;

    public static final String COL_ID = "id";

    public static final String COL_ORDER_ID = "order_id";

    public static final String COL_CATEGORY_ID = "category_id";

    public static final String COL_GOODS_ID = "goods_id";

    public static final String COL_PRODUCT_ID = "product_id";

    public static final String COL_PRODUCT_NUM = "product_num";

    public static final String COL_SEND_NUM = "send_num";

    public static final String COL_MERCHANT_ID = "merchant_id";

    public static final String COL_BARCODE = "barcode";

    public static final String COL_NAME = "name";

    public static final String COL_SPEC_INFO = "spec_info";

    public static final String COL_IMAGE_ID = "image_id";

    public static final String COL_COST_PRICE = "cost_price";

    public static final String COL_SELL_PRICE = "sell_price";

    public static final String COL_VIP_PRICE = "vip_price";

    public static final String COL_BUY_PRICE = "buy_price";

    public static final String COL_ITEM_TYPE = "item_type";

    public static final String COL_GOODS_PRICE = "goods_price";

    public static final String COL_FREIGHT = "freight";

    public static final String COL_DISCOUNTS = "discounts";

    public static final String COL_TOTAL_PRICE = "total_price";

    public static final String COL_PAYMENT = "payment";

    public static final String COL_VIP_DISCOUNT = "vip_discount";

    public static final String COL_ORDER_DISCOUNT = "order_discount";

    public static final String COL_GOODS_DISCOUNT = "goods_discount";

    public static final String COL_DELETE_FLAG = "delete_flag";

    public static final String COL_CREATOR_ID = "creator_id";

    public static final String COL_CREATOR = "creator";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_MODIFY_TIME = "modify_time";
}